Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle edge cases gracefully in extract_frames_from_video #269

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

humpydonkey
Copy link
Collaborator

@humpydonkey humpydonkey commented Oct 14, 2024

Fix a few minor issues in the extract_frames_from_video:

  1. set orig_fps to 24 (the most common value) when the property is missing in the video
  2. set the input fps param to 1 when it's missing or a non-positive value.
  3. round up the elapsed_time when the value is like 0.9999999 so it includes the last frame.

Also remove the tests/data/video/test.mp4 file and generate it on the fly.


Copy link
Member

@dillonalaird dillonalaird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@humpydonkey humpydonkey merged commit f0a15ed into main Oct 14, 2024
8 checks passed
@humpydonkey humpydonkey deleted the improve-robuness-extract_frames_from_video branch October 14, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants